import { sendUser, Message } from '/@/api/sys/message'
import { state } from './dialogonlineuser.vue'

//发送通知
export const sendMessage = () => {
    const userIds = new Array(state.onlineUser.userId)
    const msg: Message = {
        Userids: userIds,
        Message: state.chatContent,
        Title: '消息通知',
    }
    //发送消息跟指定人员
    sendUser(msg)
        .then((res) => {
            state.isVisible = false
        })
        .catch((err) => {
            console.log(err)
        })
}
